Subtotaling
A subtotal is a summary that totals or sums numeric values in a group. Crystal Reports groups and subtotals in a single step.
Note: If you are creating a subtotal using database tables that are grouped in a one-to-many linking relationship, you may need to use a running total instead of a subtotal. See Creating running totals in a one-to-many linking relationship.
Subtotaling data
In this example you will subtotal Last Year's Sales by Country.
To subtotal data
- Create a report using the sample data, Xtreme.mdb, and place the following fields from left to right in the Details section:
{customer.CUSTOMER NAME}
{customer.REGION}
{customer.POSTAL CODE}
{customer.COUNTRY}
{customer.LAST YEAR'S SALES}
- Right-click the Last Year's Sales field, point to Insert and choose Subtotal from the shortcut menu.
The Insert Subtotal dialog box appears with the chosen field listed at the top of the dialog box.
- Choose the field you want the data grouped by, specify a sort direction and then click OK when finished. The values in each group are now subtotaled.